# https://leetcode.cn/problems/plus-one/description/?envType=problem-list-v2&envId=array
from typing import List


class Solution:
    def plusOne(self, digits: List[int]) -> List[int]:
        str1 = ''
        for i in digits:
            str1 += str(i)
        return [int(i) for i in str(int(str1) + 1)]



if __name__ == '__main__':
    pass
    digits = [9, 9]
    s = Solution()
    print(s.plusOne(digits))
    # print(digits[-1])
    # print()
    #
    # print([1, 2, 3] + [4])
